Active Server Pages by Munishwar Gulati & Mini Gulati

Active Server Pages by Munishwar Gulati & Mini Gulati

Author:Munishwar Gulati & Mini Gulati [Gulati, Munishwar]
Language: eng
Format: epub, pdf
Published: 2016-12-01T08:00:00+00:00


Chapter 6 : Active Server Pages

4 5

UserName “Bill Gates”

<FORM METHOD= “Post” Action = “/nextpage.asp”>

<INPUT TYPE = “HIDDEN”= “UserName” VALUE=”<%=UserName

%>”>

<INPUT TYPE= “SUBMIT” VALUE= “Next Page”>

</FORM>

</BODY>

</HTML>

This page includes an HTML form. The form has a hidden field named

UserName that contains the value of the UserName variable. The form

also contains one button. When the button is clicked, the page

nextpage.asp is loaded and the data in the hidden form field is passed

the new page.

You can continue to pass data from page to page in this way

indefinitely. On each page, you must use the Form collection of the

Request object to retrieve the data in the hidden field. Next, you must

create a new hidden field so the data can be passed to a new page

again. Here’s an example:

<HTML>

<HEAD><TITLE>Next Page</TITLE></HEAD>

<BODY>

<%

UserName = Request.Form (“UserName”)

%>

<FORM METHOD = ”Post” Action= ” /nextpage.asp”>

<INPUT NAME= “UserName” TYPE= “HIDDEN” VALUE= ”

<% = UserName %>

%>

<INPUT TYPE= “SUBMIT” VALUE= “Next Page”>

</FORM>

</BODY>

</HTML>

Microsoft wants you to think of Active Server Pages in traditional

programming terms. When you create a single Active Server Page.

you’re creating something like a procedure or subroutine. When you

create a group of related Active Server Pages, you’re creating an

application.

However, an application is something more than a group of pages

sitting on a hard drive. When Active Server Pages are joined together

in an application, they have certain properties that they would

otherwise lack. Following is a list of some features of an Active Server

Pages application.

4 6

Chapter 6 : Active Server Pages

Data can be shared among the pages in an application, and

therefore among more than one user of a Web site.

An application has events that can trigger special application

scripts.

An instance of an object can be shared among all the pages in

an application.

Separate applications can be configured with the Internet

Service manager to have different properties.

Separate applications can be isolated to execute in their own

memory space. This means that if one application crashes.

the other won’t crash.

You can stop one application (unloading all of its components

from memory) without affecting other applications.

A Web site can have more than one application. Typically, you create

separate applications when you have collections of pages related to

separated tasks. For example, you might create one application

containing all the pages meant for public consumption. You might

create another application that’s restricted to use by Web site

administrators.

An application is defined by using the Internet Service Manager to

specify a root directory for the application. An application consists of

a particular directory and all of its subdirectories. If one of these

subdirectories is also defined to be an application, then it constitutes

a separate application. In other words, no two applications overlap.

Follow these steps to define an Active Server Pages application

1.

Launch the Internet Service manager from the Microsoft

Internet Information Server program group.

2.

Click the name of your default Web site in the navigation tree;

(If you haven’t changed anything, it will be named Default

Web Site).

3.

You can select existing directory, the default Web site, or

create a new directory for your application. To create a new

virtual directory, right-click the name of your default Web site

and then choose New | Virtual Directory.

4.

After you have chosen a directory for your application, you

need to view its property sheet.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.